import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:meiyunapp/common/url_base.dart';
import 'package:meiyunapp/entity/goods_detail_entity.dart';
import 'package:meiyunapp/widget/app_image_widget.dart';

class StoreInfoWidget extends StatelessWidget {
  GoodsDetailStore store;

  StoreInfoWidget(this.store, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      padding: const EdgeInsets.symmetric(vertical: 10),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              AppImageWidget(
                url: store.coverImage,
                width: 97,
                height: 62,
              ),
              const SizedBox(
                width: 5,
              ),
              Expanded(child: Text(store.name)),
            ],
          ),
          const SizedBox(
            height: 10,
          ),
          Text("营业时间:${store.businessEndTime}"),
          const SizedBox(
            height: 5,
          ),
          Text(
            "门户地址:${store.address}",
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
          ),
          const SizedBox(
            height: 5,
          ),
          Text("预约电话:${store.contactMobile}"),
        ],
      ),
    );
  }
}
